package com.kelvin.paopao.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kelvin.kelvinlib.imageloader.GlideUtil;
import com.kelvin.paopao.R;
import com.kelvin.paopao.api.responseBean.DatePersonModel;
import com.kelvin.paopao.api.responseBean.UserDetailModel;

/**
 * Created by Administrator on 2017/5/10.
 */

public class FriendAdapter extends BaseQuickAdapter<DatePersonModel, BaseViewHolder> {
    private Context context;

    public FriendAdapter(Context context) {
        super(R.layout.recycler_friend_item);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, DatePersonModel item) {
        ImageView iv = helper.getView(R.id.iv_touxiang);
        GlideUtil.loadCommonImg(item.getUser_headimg(), R.drawable.default_img, iv, context);
        helper.setText(R.id.tv_name, item.getUser_name());
    }

}
